//
//  CSearchConditionView.h
//  Delicious
//
//  Created by yilong zhang on 11-11-30.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SearchConditionViewDelegate;

@protocol SearchCellDelegate <NSObject>

@optional
-(void)DidSearchCellSelected:(int)index Text:(NSString*)text;

@end

@interface CSearchCell : UITableViewCell

@property (nonatomic, assign) id<SearchCellDelegate> delegate;
@property (nonatomic, assign) UIButton  *m_Btn;

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier Size:(CGSize)size;

-(void)OnButtonDown:(UIButton*)sender;

@end

@interface CSearchConditionView : UIView <UITableViewDelegate, UITableViewDataSource, SearchCellDelegate>

@property (nonatomic, assign) CGFloat       m_fHeight;
@property (nonatomic, assign) UITableView   *m_Table;
@property (nonatomic, assign) NSMutableArray*m_Items;
@property (nonatomic, assign) int           m_nIndex;

@property (nonatomic, assign) id<SearchConditionViewDelegate>   m_Delegate;

-(id)initWithFrame:(CGRect)frame Items:(NSArray*)items;
-(void)ShowSearchConditionView;
-(void)HiddenSearchConditionView;

@end

@protocol SearchConditionViewDelegate <NSObject>

@optional
-(void)DidSearchConditionViewSelected:(int)index Text:(NSString*)text;

@end
